package com.newland.boss1.zxy.controller;

import com.newland.boss1.zxy.feign.ProviderCall;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : zhangxuyuan
 * @Project: springcloudprometheus
 * @Package com.newland.boss1.zxy.controller
 * @date Date : 2021年03月11日 10:02
 */
@RestController
public class IndexController {

    @Autowired
    ProviderCall providerCall;

    @GetMapping("/{name}")
    public String index(@PathVariable("name")String name) throws InterruptedException {
        Thread.sleep(1000);
        return providerCall.sayHello(name);
    }
}
